/*
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __X_MAIN__
#define __X_MAIN__

#include "d_main.h"
#include "d_ticcmd.h"
#include "doomdef.h"
#include "doomtype.h"
#include "g_game.h"

extern dboolean x_longtics;
extern int header_size;
extern unsigned char *header;
extern ticcmd_t *tics[MAXPLAYERS];
extern int current_tic;
extern int tic_len[MAXPLAYERS];
extern int mem_len[MAXPLAYERS];
extern char savepoint_style;

int x_openDemo(unsigned char *demo_p, size_t size);
unsigned char const *x_readTics(unsigned char const *start_p, size_t size);
void x_saveDemo(FILE *file);
void x_moveTics(int offset);
void x_makeCmds(void);
void x_goForward(int numtics);
void x_goBack(int numtics);
void x_display(void);

#endif

